class ResponseFeedbackTypeEnum {
  final String name;
  final String value;

  const ResponseFeedbackTypeEnum({
    required this.name,
    required this.value,
  });

  factory ResponseFeedbackTypeEnum.fromEntry(String key, Object? rawValue) {
    return ResponseFeedbackTypeEnum(
      name: key,
      value: rawValue?.toString() ?? '',
    );
  }

  Map<String, dynamic> toJson() => {
        'name': name,
        'value': value,
      };

  String get displayName => value.isEmpty ? name : value;
}

